package com.erpanderp.wam.usm.view.user;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.event.AjaxBehaviorEvent;
import javax.xml.registry.infomodel.PersonName;

import org.primefaces.component.datatable.DataTable;
import org.primefaces.context.RequestContext;
import org.primefaces.event.FlowEvent;

import com.erpanderp.wam.ac.model.entity.reimbursement.MiscExpenseDetails;
import com.erpanderp.wam.usm.model.entity.user.Education;
import com.erpanderp.wam.usm.model.entity.user.Employee;
import com.erpanderp.wam.usm.model.entity.user.Employment;
import com.erpanderp.wam.usm.model.entity.user.NewJoinee;
import com.erpanderp.wam.usm.model.entity.user.PassportAndPANDetails;
import com.erpanderp.wam.usm.model.entity.user.Reference;
import com.erpanderp.wam.usm.model.service.user.NewJoineeDAO;
import com.erpanderp.wam.util.CommonLookup;
import com.erpanderp.wam.util.ValidationUtil;

@ManagedBean
@ViewScoped
public class EformBean implements Serializable {

	private static final long serialVersionUID = 1L;
	private Employment employment = new Employment();

	private Employee employee = new Employee();
	private NewJoinee newJoinee = new NewJoinee();

	private Education education = new Education();
	private Set<Reference> references = new HashSet<Reference>();
	private Reference reference = new Reference();

	private String gender;
	private String maritalStatus;
	private PassportAndPANDetails passportAndPANDetails = new PassportAndPANDetails();

	// Set<Education> educationsList = new HashSet<Education>();
	private List<Education> educationsList = new ArrayList<Education>();
	private List<Reference> referencesList = new ArrayList<Reference>();
	private List<Employment> employmentList = new ArrayList<Employment>();
	// Set<Employment> employmentList = new HashSet<Employment>();
	private NewJoineeDAO newJoineeDAO = new NewJoineeDAO();
	private boolean FORM_VALID = true;
	private String currentStepId;
	private String stepToGo;
	SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy");
	private boolean EDUCATION_FORM_VALID;
	private boolean EMPLOYMENT_FORM_VALID;
	private DataTable listToBeAssignedDatatable;
	private DataTable referenceListToBeAssignedToDatatable;
	private DataTable employmentListToBeAssignedDatatable;
	private Date currentDate = new Date();
	private boolean passportEverRejected;
	private boolean FAMILY_DETAILS_RENDERER;
	private boolean VISA_REJECTED_BEFORE;

	public EformBean(){
		System.out.println("Initializing...");
		newJoinee.setMaritalStatus("No");
	}
	public String getCurrentStepId() {
		return currentStepId;
	}

	public void setCurrentStepId(String currentStepId) {
		this.currentStepId = currentStepId;
	}

	public String reinit() throws ParseException {
		System.out.println("IN ADDTOCOLLECTOR METHOD");
		validateEmploymentForm();
		if (EMPLOYMENT_FORM_VALID) {
			newJoinee.getEmployeements().add(employment);
			employment.setCreateDate(new Date());
			employment.setModifiedBy(null);
			employment.setDescription(null);
			employment.setStatus("Active");
			employmentList.add(employment);
			employment = new Employment();
			System.out.println("EMPLOYMENT LIST SIZE:" + employmentList.size());
		} else {

			System.out.println("EMPLOYEMENT LIST IS EMPTY");
		}

		return null;

	}

	public String addToEducaitonCollector() throws ParseException {
		System.out.println("IN ADDTOEDUCATIONCOLLECTOR METHOD");
		validateEducation();
		if (EDUCATION_FORM_VALID) {
			newJoinee.getEducations().add(education);
			education.setCreateDate(new Date());
			education.setCreatedby(null);
			education.setStatus("Active");
			educationsList.add(education);
			education = new Education();
			System.out.println("EDUCATION LIST SIZE:" + educationsList.size());
		} else {

			System.out.println("EDUCATION LIST IS EMPTY");
		}

		return null;

	}
	
	public String addToReferenceCollector(){
		System.out.println("IN ADDTOEDUCATIONCOLLECTOR METHOD");
		
		if (EDUCATION_FORM_VALID) {
			newJoinee.getEducations().add(education);
			newJoinee.getReferences().add(reference);
			reference.setCreateDate(new Date());
			reference.setStatus("ACTIVE");
			referencesList.add(reference);
			reference = new Reference();
			System.out.println("REFERENCES LIST SIZE:" + referencesList.size());
		} else {

			System.out.println("EDUCATION LIST IS EMPTY");
		}

		return null;

	}
	
	
	

	public void removeFromEducationList(ActionEvent e) {
		Education selectedEducation = (Education) listToBeAssignedDatatable
				.getRowData();
		educationsList.remove(selectedEducation);
	}
	
	public void removeFromReferenceList(ActionEvent e) {
		Reference selectedReference = (Reference)referenceListToBeAssignedToDatatable
				.getRowData();
		referencesList.remove(selectedReference);
	}

	public void removeFromEmploymentList(ActionEvent e) {
		Employment selectedEmployment = (Employment) employmentListToBeAssignedDatatable
				.getRowData();
		employmentList.remove(selectedEmployment);
	}

	public String saveEform() {
		System.out.println("IN SAVE EFORM");
		if (FORM_VALID) {
			newJoinee.setEnrolementStatus(CommonLookup.ENROLLMENT_STATUS_NOT_ENROLLED);
			newJoinee.setMaritalStatus(maritalStatus);
			newJoinee.setGender(gender);
			newJoinee.setStatus(CommonLookup.STATUS_ACTIVE);
			passportAndPANDetails.setCreatyeDate(new Date());
			passportAndPANDetails.setCreatedBy(null);
			passportAndPANDetails.setDescription(null);
			passportAndPANDetails.setModifiedby(null);
			passportAndPANDetails.setStatus("Active");
			
			newJoinee.getPassportAndPANDetails().add(passportAndPANDetails);
			
			if(newJoineeDAO.registerNewJoinee(newJoinee)){
				RequestContext.getCurrentInstance().execute("eformCloseDiaglog.show();");
			}else{
				RequestContext.getCurrentInstance().execute("eformCloseDiaglog.show();");
			}
			System.out.println("NEW JOINEE REGISTERED SUCCESSFULLY");
			
			
			newJoinee = new NewJoinee();

		}
		return null;
	}

	public String onFlowProcess(FlowEvent event) throws ParseException {
		System.out.println("NAVIGATING...");
		
		validate();
		
		if (!FORM_VALID) {
			FORM_VALID = true;
			System.out.println("FORM-NOT-VALID");
			RequestContext.getCurrentInstance().addPartialUpdateTarget(":formData:growl");
			RequestContext.getCurrentInstance().addPartialUpdateTarget(":formData:identificationGrowl");
			RequestContext.getCurrentInstance().addPartialUpdateTarget(":formData:educationGrowl");
			RequestContext.getCurrentInstance().addPartialUpdateTarget(":formData:refGrowl");
			RequestContext.getCurrentInstance().addPartialUpdateTarget(":formData:empGrowl");
			
			stepToGo = event.getOldStep();
			
		} else {
			System.out.println("FORM-VALID");
			System.out.println("STEP-TOGO-ID:" + stepToGo);
			stepToGo = event.getNewStep();
			if (stepToGo.equals("reference")) {
				if (educationsList != null) {
					if (educationsList.size() != 0 && educationsList.size() >= 3) {
						System.out.println("EDUCATION LIST IS NOT EMPTY");
						stepToGo = event.getNewStep();
					} else {
						System.out.println("EDUCATION LIST IS EMPTY");
						stepToGo = event.getOldStep();
						FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "New joinee should have 3 or more qualifications.", ""));
					}
				}
			}
		}
		RequestContext.getCurrentInstance().addPartialUpdateTarget("formData");
		System.out.println("STEP TO GO: " + stepToGo);
		return stepToGo;

	}

	public String save(ActionEvent actionEvent) {
		// Persist user
		System.out.println("USER IS PERSISTED");
		FacesMessage msg = new FacesMessage(
				"New Joinee is registered successfully", "Welcome :"
						+ newJoinee.getFirstName());
		FacesContext.getCurrentInstance().addMessage(null, msg);
		RequestContext.getCurrentInstance().addPartialUpdateTarget("eformCloseDiaglog.show();");
		return "eform";
		

	}
	
	public String refreshEform(){
		System.out.println("EFORM REFRESH");
		return "eform";
	}
	
	public void maritalStatusOnChangeListner(AjaxBehaviorEvent a){
		if(newJoinee.getMaritalStatus().equals("Yes")){
			FAMILY_DETAILS_RENDERER = true;
			maritalStatus = "Yes";
		}else{
			FAMILY_DETAILS_RENDERER = false;
			maritalStatus = "No";			
		}
	}
	
	public void genderOnChangeListner(AjaxBehaviorEvent a){
		gender = newJoinee.getGender();
	}
	
	public void visaRejectedBefore(AjaxBehaviorEvent a){
		System.out.println("IN VASA EVER REJECTED STATUS CHANGE LISTNER");
		System.out.println("SELECTED STATUS IS: "+passportAndPANDetails.getVISAEverRejected());
		if(passportAndPANDetails.getVISAEverRejected().equals("Yes")){
			VISA_REJECTED_BEFORE = true;
			
			
		}else{
			VISA_REJECTED_BEFORE = false;
		}
	}

	public boolean validate() throws ParseException {
		System.out.println("IN VALIDATE METHOD");
		FORM_VALID = true;
		String passportNumber = passportAndPANDetails.getPassportNumber() != null ? passportAndPANDetails
				.getPassportNumber().toString() : null;

		String panNumber = passportAndPANDetails.getPANNumber() != null ? passportAndPANDetails
				.getPANNumber().toString() : null;
		String drivingLicenseNumber = passportAndPANDetails
				.getDrivinglicenseNumber() != null ? passportAndPANDetails
				.getDrivinglicenseNumber().toString() : null;
		System.out.println("PAN NUMBER =" + panNumber);
		System.out.println("PAN NUMBER =" + panNumber);

		if (ValidationUtil.isEmpty(newJoinee.getFirstName(), "First Name",
				null, FacesContext.getCurrentInstance()) != null) {
			System.out.println("FIRST NAME IS EMPTY");

			FORM_VALID = false;

		}

		if (ValidationUtil.isEmpty(newJoinee.getLastName(), "Last name", null,
				FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
			System.out.println("FORM-VLD:LASTNAME" + FORM_VALID);
		}
		if (ValidationUtil.isEmpty(
				(newJoinee.getDateofbirth() != null) ? newJoinee
						.getDateofbirth().toString() : null, "Date of birth",
				null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		} else {
			System.out.println("DATE OF BIRTH IS ENTERED BY NEW JOINEE");
			if (ValidationUtil.isDOBDateValid(newJoinee.getDateofbirth()
					.toString(), "", null, FacesContext.getCurrentInstance()) != null) {
				System.out.println("FORM VALID FALSE-------");
				FORM_VALID = false;
			}
		}
		if (ValidationUtil.isEmpty(newJoinee.getTelephone(), "Contact number",
				null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		}
	
		if (ValidationUtil.isEmpty(newJoinee.getNationality(), "Nationality",
				null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
			System.out.println("Nationality is empty");
		}
		if (ValidationUtil.isEmpty(newJoinee.getCitizenship(), "Citizenship",
				null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;

		}
		if (ValidationUtil.isEmpty(newJoinee.getPrimarySkill(),
				"Primary skills", null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		}
		
		if (ValidationUtil.isEmpty(newJoinee.getBirthPlace(), "Birth place",
				null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		}
		
		
		if (ValidationUtil.isEmpty(newJoinee.getMothermaidenName(),
				"Mother maiden name", null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		}
		if (ValidationUtil.isEmpty(newJoinee.getFathername(), "Father name",
				null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		}
		if (ValidationUtil.isEmpty(newJoinee.getMotherName(), "Mother name",
				null, FacesContext.getCurrentInstance()) != null) {

			FORM_VALID = false;
		}
		if(newJoinee.getMaritalStatus().equals("Yes")){
			if (ValidationUtil.isEmpty(newJoinee.getSpouseName(), "Spouse name",
					null, FacesContext.getCurrentInstance()) != null) {

				FORM_VALID = false;
			}
		
		}
	
		if (ValidationUtil.isEmpty(newJoinee.getEmail(), "Personal Email",
				null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		} else {
			System.out.println("EMAIL ENTERED");
			if (ValidationUtil.isEmailValid(newJoinee.getEmail(),
					"Personal Email", null, FacesContext.getCurrentInstance()) != null) {
				FORM_VALID = false;
			} else {
				System.out.println("WARNING MESSAGE IS NULL");
			}
		}

	
		if (!newJoinee.getEmail().equals("") && !newJoinee.getAlternateEmail().equals("")) {
			if (newJoinee.getEmail().equals(newJoinee.getAlternateEmail())) {
				FORM_VALID = false;
				FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,
										" Personal email and Alternate email should not be same.",
										""));
			}
		}
		System.out.println(newJoinee.getMaritalStatus() + " MS");
		if(stepToGo != null && stepToGo.equals("personal")){
			if (ValidationUtil.isEmpty(newJoinee.getMaritalStatus(),
					"Marital staus", null, FacesContext.getCurrentInstance()) != null) {
				FORM_VALID = false;
			}	
		}
		

		if (ValidationUtil.isEmpty(newJoinee.getCurrentAddress(),
				"Current address", null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		}
		if (ValidationUtil.isEmpty(newJoinee.getPermanentAddress(),
				"Permanent address", null, FacesContext.getCurrentInstance()) != null) {
			FORM_VALID = false;
		}
		
		
		//Identification Validation...
		
		if(stepToGo != null && stepToGo.equals("identification")){
			boolean ID_PROOF_ENTERED = false;
			if(passportAndPANDetails.getPANNumber() != null && !passportAndPANDetails.getPANNumber().equals("")){
				if(ValidationUtil.isPANNUMBERValid(passportAndPANDetails.getPANNumber(), "PAN ", "", FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
					ID_PROOF_ENTERED = true;
				}else{
					ID_PROOF_ENTERED = true;
				}
			}
			
			if(passportAndPANDetails.getPassportNumber() != null && !passportAndPANDetails.getPassportNumber().equals("")){
				if(ValidationUtil.isPASSPORTNUMBERValid(passportAndPANDetails.getPassportNumber(), "Passport ", "", FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
					ID_PROOF_ENTERED = true;
				}else{
					ID_PROOF_ENTERED = true;
				}
			}
			
			if(passportAndPANDetails.getDrivinglicenseNumber() != null && !passportAndPANDetails.getDrivinglicenseNumber().equals("")){
				if(ValidationUtil.isDRIVINGLICENSENUMBERValid(passportAndPANDetails.getDrivinglicenseNumber(), "Driver License ", "", FacesContext.getCurrentInstance()) != null){
					FORM_VALID = false;
					ID_PROOF_ENTERED = true;
				}else{
					ID_PROOF_ENTERED = true;
				}
			}
			
			if(!ID_PROOF_ENTERED){
				FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, "Please enter at least one Identification detail.",
						""));
				FORM_VALID = false;
			}
		}
		
		
		System.out.println("FORM_VALID:" + FORM_VALID);
		return FORM_VALID;
	}

	public boolean validateEducation() throws ParseException {
		EDUCATION_FORM_VALID = true;

		if (ValidationUtil.isEmpty(education.getQualification(),
				"Qualification", null, FacesContext.getCurrentInstance()) != null) {
			System.out.println("FIRST NAME IS EMPTY");

			EDUCATION_FORM_VALID = false;

		}
		if (ValidationUtil.isEmpty(education.getInstituteSchoolCollage(),
				"Institute name", null, FacesContext.getCurrentInstance()) != null) {
			System.out.println("FIRST NAME IS EMPTY");

			EDUCATION_FORM_VALID = false;

		}
		if (ValidationUtil.isEmpty(education.getUniversityOrBoardName(),
				"University name", null, FacesContext.getCurrentInstance()) != null) {
			System.out.println("FIRST NAME IS EMPTY");

			EDUCATION_FORM_VALID = false;

		}
		if (ValidationUtil.isEmpty(
				(education.getPeriodFrom() != null) ? education.getPeriodFrom()
						.toString() : null, "Period From", null, FacesContext
						.getCurrentInstance()) != null) {
			EDUCATION_FORM_VALID = false;
		}
		if (ValidationUtil.isEmpty(
				(education.getPeriodTo() != null) ? education.getPeriodFrom()
						.toString() : null, "Period To", null, FacesContext
						.getCurrentInstance()) != null) {
			EDUCATION_FORM_VALID = false;
		}
		if (ValidationUtil.isEmpty(education.getProgram(), "Education Program",
				null, FacesContext.getCurrentInstance()) != null) {
			System.out.println("FIRST NAME IS EMPTY");

			EDUCATION_FORM_VALID = false;

		}
		if (ValidationUtil.isEmpty(education.getMarks(), "Percentage of marks",
				null, FacesContext.getCurrentInstance()) != null) {
			System.out.println("FIRST NAME IS EMPTY");

			EDUCATION_FORM_VALID = false;

		}else{
		    Float marks = Float.valueOf(education.getMarks());
		    System.out.println("MARKS "+marks);
		 
			if(marks < 35.0 || marks > 100.0){
				FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, "Marks percentage should  be between 35 than 100.",
						""));
				EDUCATION_FORM_VALID = false;
			}
		    
		    
		}

		Date periodFrom = education.getPeriodFrom() != null ? education
				.getPeriodFrom() : null;
		Date periodTo = education.getPeriodTo() != null ? education
				.getPeriodTo() : null;

		if (periodFrom != null && periodTo != null) {

			String fromDate = sdf.format(periodFrom);
			String toDate = sdf.format(periodTo);

			Calendar calendarForSunday = Calendar.getInstance();
			calendarForSunday.setTime(periodFrom);

			Calendar calendarForSaturday = Calendar.getInstance();
			calendarForSaturday.setTime(periodTo);

			Date date1 = sdf.parse(fromDate);
			Date date2 = sdf.parse(toDate);
			if (date1.compareTo(date2) > 0) {
				EDUCATION_FORM_VALID = false;
				System.out.println("FROMDATE is after TODATE");
				FacesContext.getCurrentInstance().addMessage(
						null,
						new FacesMessage(FacesMessage.SEVERITY_WARN,
								" From-date should be before To-date", ""));
			}
		}
		return EDUCATION_FORM_VALID;

	}

	public void passportEverRejectedListner() {
		System.out.println("PASSPORT EVER REJECTED LISTNER CALLED");
		if (passportAndPANDetails.getVISAEverRejected().equals("Yes")) {
			passportEverRejected = true;
		} else {
			passportEverRejected = false;
		}
	}

	public boolean validateEmploymentForm() throws ParseException {
		EMPLOYMENT_FORM_VALID = true;

		if (ValidationUtil.isEmpty(employment.getCompanyName(),
				"Organization name", null, FacesContext.getCurrentInstance()) != null) {
			System.out.println("FIRST NAME IS EMPTY");

			EMPLOYMENT_FORM_VALID = false;

		}
		Date periodFrom = employment.getPeriodFrom() != null ? employment
				.getPeriodFrom() : null;
		Date periodTo = employment.getPeriodTo() != null ? employment
				.getPeriodTo() : null;

		if (periodFrom != null && periodTo != null) {

			String fromDate = sdf.format(periodFrom);
			String toDate = sdf.format(periodTo);

			Calendar calendarForSunday = Calendar.getInstance();
			calendarForSunday.setTime(periodFrom);

			Calendar calendarForSaturday = Calendar.getInstance();
			calendarForSaturday.setTime(periodTo);

			Date date1 = sdf.parse(fromDate);
			Date date2 = sdf.parse(toDate);
			if (date1.compareTo(date2) > 0) {
				EMPLOYMENT_FORM_VALID = false;
				System.out.println("FROMDATE is after TODATE");
				FacesContext.getCurrentInstance().addMessage(
						null,
						new FacesMessage(FacesMessage.SEVERITY_WARN,
								" From-date should be before To-date", ""));
			}
		}
		return EMPLOYMENT_FORM_VALID;

	}

	public Employment getEmployment() {
		return employment;
	}

	public void setEmployment(Employment employment) {
		this.employment = employment;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public NewJoinee getNewJoinee() {
		return newJoinee;
	}

	public void setNewJoinee(NewJoinee newJoinee) {
		this.newJoinee = newJoinee;
	}

	public Education getEducation() {
		return education;
	}

	public void setEducation(Education education) {
		this.education = education;
	}

	public PassportAndPANDetails getPassportAndPANDetails() {
		return passportAndPANDetails;
	}

	public void setPassportAndPANDetails(
			PassportAndPANDetails passportAndPANDetails) {
		this.passportAndPANDetails = passportAndPANDetails;
	}

	public Set<Reference> getReferences() {
		return references;
	}

	public void setReferences(Set<Reference> references) {
		this.references = references;
	}

	public List<Employment> getEmploymentList() {
		return employmentList;
	}

	public void setEmploymentList(List<Employment> employmentList) {
		this.employmentList = employmentList;
	}

	public List<Education> getEducationsList() {
		return educationsList;
	}

	public void setEducationsList(List<Education> educationsList) {
		this.educationsList = educationsList;
	}

	/*
	 * public Set<Education> getEducationsList() { return educationsList; }
	 * public void setEducationsList(Set<Education> educationsList) {
	 * this.educationsList = educationsList; }
	 */
	/*
	 * public Set<Employment> getEmploymentList() { return employmentList; }
	 * public void setEmploymentList(Set<Employment> employmentList) {
	 * this.employmentList = employmentList; }
	 */
	public boolean isFORM_VALID() {
		return FORM_VALID;
	}

	public void setFORM_VALID(boolean fORM_VALID) {
		FORM_VALID = fORM_VALID;
	}

	public String getStepToGo() {
		return stepToGo;
	}

	public void setStepToGo(String stepToGo) {
		this.stepToGo = stepToGo;
	}

	public Reference getReference() {
		return reference;
	}

	public void setReference(Reference reference) {
		this.reference = reference;
	}

	public boolean isEDUCATION_FORM_VALID() {
		return EDUCATION_FORM_VALID;
	}

	public void setEDUCATION_FORM_VALID(boolean eDUCATION_FORM_VALID) {
		EDUCATION_FORM_VALID = eDUCATION_FORM_VALID;
	}

	public boolean isEMPLOYMENT_FORM_VALID() {
		return EMPLOYMENT_FORM_VALID;
	}

	public void setEMPLOYMENT_FORM_VALID(boolean eMPLOYMENT_FORM_VALID) {
		EMPLOYMENT_FORM_VALID = eMPLOYMENT_FORM_VALID;
	}

	public DataTable getListToBeAssignedDatatable() {
		return listToBeAssignedDatatable;
	}

	public void setListToBeAssignedDatatable(DataTable listToBeAssignedDatatable) {
		this.listToBeAssignedDatatable = listToBeAssignedDatatable;
	}

	public DataTable getEmploymentListToBeAssignedDatatable() {
		return employmentListToBeAssignedDatatable;
	}

	public void setEmploymentListToBeAssignedDatatable(
			DataTable employmentListToBeAssignedDatatable) {
		this.employmentListToBeAssignedDatatable = employmentListToBeAssignedDatatable;
	}

	public Date getCurrentDate() {
		return currentDate;
	}

	public void setCurrentDate(Date currentDate) {
		this.currentDate = currentDate;
	}

	public boolean isPassportEverRejected() {
		return passportEverRejected;
	}

	public void setPassportEverRejected(boolean passportEverRejected) {
		this.passportEverRejected = passportEverRejected;
	}

	public boolean isFAMILY_DETAILS_RENDERER() {
		return FAMILY_DETAILS_RENDERER;
	}

	public void setFAMILY_DETAILS_RENDERER(boolean fAMILY_DETAILS_RENDERER) {
		FAMILY_DETAILS_RENDERER = fAMILY_DETAILS_RENDERER;
	}

	public List<Reference> getReferencesList() {
		return referencesList;
	}

	public void setReferencesList(List<Reference> referencesList) {
		this.referencesList = referencesList;
	}

	public DataTable getReferenceListToBeAssignedToDatatable() {
		return referenceListToBeAssignedToDatatable;
	}

	public void setReferenceListToBeAssignedToDatatable(
			DataTable referenceListToBeAssignedToDatatable) {
		this.referenceListToBeAssignedToDatatable = referenceListToBeAssignedToDatatable;
	}

	public boolean isVISA_REJECTED_BEFORE() {
		return VISA_REJECTED_BEFORE;
	}

	public void setVISA_REJECTED_BEFORE(boolean vISA_REJECTED_BEFORE) {
		VISA_REJECTED_BEFORE = vISA_REJECTED_BEFORE;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getMaritalStatus() {
		return maritalStatus;
	}
	public void setMaritalStatus(String maritalStatus) {
		this.maritalStatus = maritalStatus;
	}
}
